{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.7.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-09-08T09:48:58.097326Z","iopub.execute_input":"2022-09-08T09:48:58.097778Z","iopub.status.idle":"2022-09-08T09:48:58.113196Z","shell.execute_reply.started":"2022-09-08T09:48:58.097742Z","shell.execute_reply":"2022-09-08T09:48:58.111858Z"},"trusted":true},"execution_count":2,"outputs":[{"name":"stdout","text":"/kaggle/input/heart-disease/heart.csv\n","output_type":"stream"}]},{"cell_type":"code","source":"import numpy as np  # 导入numpy包\nimport pandas as pd  # 导入pandas库\n# 1.数据读取\ndf_heart = pd.read_csv(\"../input/heart-disease/heart.csv\")   # 读取文件\ndf_heart.head()     # 显示前五行数据","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:58.275869Z","iopub.execute_input":"2022-09-08T09:48:58.276705Z","iopub.status.idle":"2022-09-08T09:48:58.315713Z","shell.execute_reply.started":"2022-09-08T09:48:58.276668Z","shell.execute_reply":"2022-09-08T09:48:58.314545Z"},"trusted":true},"execution_count":3,"outputs":[{"execution_count":3,"output_type":"execute_result","data":{"text/plain":"   age  sex  cp  trestbps  chol  fbs  restecg  thalach  exang  oldpeak  slope  \\\n0   63    1   3       145   233    1        0      150      0      2.3      0   \n1   37    1   2       130   250    0        1      187      0      3.5      0   \n2   41    0   1       130   204    0        0      172      0      1.4      2   \n3   56    1   1       120   236    0        1      178      0      0.8      2   \n4   57    0   0       120   354    0        1      163      1      0.6      2   \n\n   ca  thal  target  \n0   0     1       1  \n1   0     2       1  \n2   0     2       1  \n3   0     2       1  \n4   0     2       1  ","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>age</th>\n      <th>sex</th>\n      <th>cp</th>\n      <th>trestbps</th>\n      <th>chol</th>\n      <th>fbs</th>\n      <th>restecg</th>\n      <th>thalach</th>\n      <th>exang</th>\n      <th>oldpeak</th>\n      <th>slope</th>\n      <th>ca</th>\n      <th>thal</th>\n      <th>target</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>63</td>\n      <td>1</td>\n      <td>3</td>\n      <td>145</td>\n      <td>233</td>\n      <td>1</td>\n      <td>0</td>\n      <td>150</td>\n      <td>0</td>\n      <td>2.3</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>37</td>\n      <td>1</td>\n      <td>2</td>\n      <td>130</td>\n      <td>250</td>\n      <td>0</td>\n      <td>1</td>\n      <td>187</td>\n      <td>0</td>\n      <td>3.5</td>\n      <td>0</td>\n      <td>0</td>\n      <td>2</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>41</td>\n      <td>0</td>\n      <td>1</td>\n      <td>130</td>\n      <td>204</td>\n      <td>0</td>\n      <td>0</td>\n      <td>172</td>\n      <td>0</td>\n      <td>1.4</td>\n      <td>2</td>\n      <td>0</td>\n      <td>2</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>56</td>\n      <td>1</td>\n      <td>1</td>\n      <td>120</td>\n      <td>236</td>\n      <td>0</td>\n      <td>1</td>\n      <td>178</td>\n      <td>0</td>\n      <td>0.8</td>\n      <td>2</td>\n      <td>0</td>\n      <td>2</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>57</td>\n      <td>0</td>\n      <td>0</td>\n      <td>120</td>\n      <td>354</td>\n      <td>0</td>\n      <td>1</td>\n      <td>163</td>\n      <td>1</td>\n      <td>0.6</td>\n      <td>2</td>\n      <td>0</td>\n      <td>2</td>\n      <td>1</td>\n    </tr>\n  </tbody>\n</table>\n</div>"},"metadata":{}}]},{"cell_type":"code","source":"df_heart.target.value_counts()     # 输出分类值及各个类别数目","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:58.318338Z","iopub.execute_input":"2022-09-08T09:48:58.318805Z","iopub.status.idle":"2022-09-08T09:48:58.333052Z","shell.execute_reply.started":"2022-09-08T09:48:58.318761Z","shell.execute_reply":"2022-09-08T09:48:58.331964Z"},"trusted":true},"execution_count":4,"outputs":[{"execution_count":4,"output_type":"execute_result","data":{"text/plain":"1    165\n0    138\nName: target, dtype: int64"},"metadata":{}}]},{"cell_type":"code","source":"# 对显示年龄/最大心率两个特征与是否患病之间的关系\nimport matplotlib.pyplot as plt    # 导入绘图工具\n# 年龄 + 最大心率 作为输入，查看分类结果散点图\nplt.scatter(x=df_heart.age[df_heart.target==1],\n           y=df_heart.thalach[df_heart.target==1], c=\"red\")\n\nplt.scatter(x=df_heart.age[df_heart.target==0],\n           y=df_heart.thalach[df_heart.target==0], marker=\"^\")\n\nplt.legend([\"Disease\", \"No Disease\"])   # 显示图例\nplt.xlabel(\"Age\")   # x轴标签\nplt.ylabel(\"Heart Rate\")   # y轴标签\nplt.show()  # 显示散点图","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:58.334940Z","iopub.execute_input":"2022-09-08T09:48:58.335312Z","iopub.status.idle":"2022-09-08T09:48:58.625583Z","shell.execute_reply.started":"2022-09-08T09:48:58.335281Z","shell.execute_reply":"2022-09-08T09:48:58.624411Z"},"trusted":true},"execution_count":5,"outputs":[{"output_type":"display_data","data":{"text/plain":"<Figure size 432x288 with 1 Axes>","image/png":"iVBORw0KGgoAAAANSUhEUgAAAYUAAAEGCAYAAACKB4k+AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/NK7nSAAAACXBIWXMAAAsTAAALEwEAmpwYAABB2klEQVR4nO2deZgU1bm4328WdhEFUSMCJioKMqDiDl4VQRSMuWISE1Q0Rgxq0Khxg/w0uWDE3NzE0RiCcUvAiCAaF4yOxCUxikFFQMCgBgGjNGDCIoKzfL8/urrpmalT09VUb9Pf+zz9TPfp6qpzqmrqO+dbRVUxDMMwDICyfHfAMAzDKBxMKBiGYRhJTCgYhmEYSUwoGIZhGElMKBiGYRhJKvLdgV2hW7du2rt373x3wzAMo6h44403NqjqXn7fFbVQ6N27NwsXLsx3NwzDMIoKEfnQ9Z2pjwzDMIwkJhQMwzCMJCYUDMMwjCRFbVMwDKP4qK2tZe3atWzfvj3fXWn1tGvXjh49elBZWZn2b0woGIaRU9auXctuu+1G7969EZF8d6fVoqps3LiRtWvXcsABB6T9u9JTH82cCb17Q1lZ/O/MmfnukWGUFNu3b6dr164mELKMiNC1a9fQK7LSWinMnAnjxsG2bfHPH34Y/wwwZkz++mUYJYYJhNyQyXkurZXCxIk7BUKCbdvi7YZhGEb2hIKI7C8iL4jIMhF5R0Su9Nr3FJEaEVnp/d3Da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G88sorALz++uscd9xxHH744Rx//PG8++67ALzzzjscffTRDBw4kKqqKlauXAnAjBkzku2XXnop9fX1u3xuTCjkkjFjYPp06NULROJ/p08vnRk2tA7vK/O8yjnZCPq7/PLLmTlzJps2bWrU/v3vf5+xY8eyePFixowZk3YVtiOOOKJZTYSNGzfy2GOP8c4777B48WImTZoEwJVXXskPfvAD/v73v/Poo4/y3e9+F4BDDjmEv/zlL7z11lv85Cc/4aabbgJg2rRpXHnllSxatIiFCxfSo0cPli9fzqxZs3jllVdYtGgR5eXlzIzg/ynrqbONJpRy6u6E2iUxy06oXaC4zolV8MspTYP+Jgw9MJIUIZ07d+aCCy6gurqa9u3bJ9tfffVV5s6NJ3U+//zzue6669Lan/qkDNp9991p164dF198MaNGjUoW73n++edZtmxZcrvNmzezdetWNm3axNixY1m5ciUiQm1tLQDHHXccU6ZMYe3atZx99tkcdNBBzJ8/nzfeeIOjjjoKiOdz6t69e2YnIwVbKRQzxTbrbi1qF1MD5pRsBv1dddVV3HvvvXz22We7vK+33nqrWY6hiooKXn/9dc455xyeeuopRowYAUBDQwOvvfYaixYtYtGiRXz00Ud06tSJH/3oR5x88sksXbqUJ598ku3b4+qyb3/72zzxxBO0b9+eM844gz//+c+oKmPHjk3u49133+WWW27Z5XGYUChWitHYmSu1S5TC0m9fpgbMGdkO+ttzzz35xje+wb333ptsO/7443n44YeBeCbTIUOGtLifl156ienTp3PJJZc0ak/M/s844wx+8YtfJNNjDx8+nDvvvDO5XaKuwqZNm9hvv/0AeOCBB5Lff/DBB3z5y19mwoQJnHXWWSxevJihQ4cyZ84cYrF4SZpPP/2UD/1WsCExoVCsFOOsOxfeV1EKy6B9larnVY7JRdDfNddc08gL6c477+T++++nqqqK3//+99xxxx2+v5s1axYDBw7k4IMP5tZbb+XRRx9ttlLYsmULo0aNoqqqisGDB/N//xcvLVNdXc3ChQupqqqib9++TJs2DYDrrruOG2+8kcMPP5y6urrkfh555BEOO+wwBg4cyNKlS7ngggvo27cvkydPZvjw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jBCYFlSDSNCRKSTqm710jC/Dpzg1S8wjKLAbAqGES1PeYWb2gD/YwLBKDZspWAYhmEkMZuCYRiGkcSEgmEYhpHEhIJhGIaRxISCYRiGkcSEgmEYhpHk/wPb+lxDer/vEgAAAABJRU5ErkJggg==\n"},"metadata":{"needs_background":"light"}}]},{"cell_type":"markdown","source":"图中显示心率越高患心脏病的可能性看起来越大","metadata":{}},{"cell_type":"code","source":"# 2.构建特征集和标签集\nX = df_heart.drop(['target'], axis = 1)     # 构建特征集\ny = df_heart.target.values                  # 构建标签集\ny = y.reshape(-1,1)                         # -1是相对索引，等价于len(y)\nprint(\"张量X的形状:\", X.shape)\nprint(\"张量y的形状:\", y.shape)","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:58.627923Z","iopub.execute_input":"2022-09-08T09:48:58.628275Z","iopub.status.idle":"2022-09-08T09:48:58.640824Z","shell.execute_reply.started":"2022-09-08T09:48:58.628237Z","shell.execute_reply":"2022-09-08T09:48:58.639503Z"},"trusted":true},"execution_count":6,"outputs":[{"name":"stdout","text":"张量X的形状: (303, 13)\n张量y的形状: (303, 1)\n","output_type":"stream"}]},{"cell_type":"code","source":"# 3.拆分数据集\n# 按照80、20的比例拆分准备训练集和测试集\nfrom sklearn.model_selection import train_test_split\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.2)","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:58.642223Z","iopub.execute_input":"2022-09-08T09:48:58.642714Z","iopub.status.idle":"2022-09-08T09:48:59.813589Z","shell.execute_reply.started":"2022-09-08T09:48:58.642671Z","shell.execute_reply":"2022-09-08T09:48:59.812371Z"},"trusted":true},"execution_count":7,"outputs":[]},{"cell_type":"code","source":"# 4.数据缩放\n# 这里使用了sklearn内置的数据缩放器\nfrom sklearn.preprocessing import MinMaxScaler  # 导入数据缩放器\nscaler = MinMaxScaler()                         # 选着归一化数据缩放器MinMaxScaler\nX_train = scaler.fit_transform(X_train)         # 特征归一化训练集fit_transform，是先拟合再应用\nX_test = scaler.transform(X_test)               # 特征归一化测试集transform,是直接应用\n# 因为所有的最大值，最小值，均值，标准差等数据的缩放的中间值都要从训练集得来，然后同样的值应用到训练集和测试集","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.815183Z","iopub.execute_input":"2022-09-08T09:48:59.816285Z","iopub.status.idle":"2022-09-08T09:48:59.827823Z","shell.execute_reply.started":"2022-09-08T09:48:59.816249Z","shell.execute_reply":"2022-09-08T09:48:59.826577Z"},"trusted":true},"execution_count":8,"outputs":[]},{"cell_type":"code","source":"# 4.2.3 建立逻辑回归模型\n\n# 1.逻辑函数的定义\n# 首先准备Sigmoid函数,一会儿调用他\n# Sigmoid函数，输入z，返回y'\ndef sigmoid(z):\n    y_hat = 1/(1+np.exp(-z))\n    return y_hat","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.829407Z","iopub.execute_input":"2022-09-08T09:48:59.829797Z","iopub.status.idle":"2022-09-08T09:48:59.839220Z","shell.execute_reply.started":"2022-09-08T09:48:59.829765Z","shell.execute_reply":"2022-09-08T09:48:59.837983Z"},"trusted":true},"execution_count":9,"outputs":[]},{"cell_type":"markdown","source":"函数接收中间变量z（线性回归函数的输出结果），返回y',即y_hat","metadata":{}},{"cell_type":"code","source":"# 2.损失函数的定义\ndef loss_function(X, y, w, b):\n    y_hat = sigmoid(np.dot(X, w) + b)                            # Sigmoid是逻辑函数 + 线性函数(wX+b)得到y'\n    loss = -((y*np.log(y_hat) + (1-y)*np.log(1-y_hat)))          # 计算损失\n    cost = np.sum(loss) / X.shape[0]                            # 整个数据集的平均损失\n    return cost                                                 # 返回整个数据集的平均损失","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.840955Z","iopub.execute_input":"2022-09-08T09:48:59.841630Z","iopub.status.idle":"2022-09-08T09:48:59.851663Z","shell.execute_reply.started":"2022-09-08T09:48:59.841587Z","shell.execute_reply":"2022-09-08T09:48:59.850243Z"},"trusted":true},"execution_count":10,"outputs":[]},{"cell_type":"markdown","source":"这里并没有把偏置当成w0来看待，因此没不需要在前面加1\n这里的线性回归函数是多变量的，因此(X, w)点积操作之后\n用Sigmoid函数进行逻辑转换生成y'","metadata":{}},{"cell_type":"markdown","source":"y'生成过程中需要注意的是点积操作中张量X和W的形状\n\nX--(242, 13) 是2D矩阵\nW--(13, 1)是2D矩阵，因为第二阶为1，，也可以看做是向量\n点积生成之后的y_hat 就是一个（242，1）的张量，其中存储了每一个样本的预测值\n\nloss = -((y*np.log(y_hat) + (1-y)*np.log(1-y_hat))\n         这句计算了每一个样本的预测值y'到真值的y的误差，其中还用到了python的广播功能\ncost = np.sum(loss)/X.shape[0]\n         是将所有的样本的误差取平均值，其中X.shape【0】就是样本个数.cost意思是成本，也就是数据集中各样本的损失\n那这个函数，无论是训练集还是测试集，输入任意一组w, b,都会返回当前数据集的平均误差值（也叫损失或成本），直到这个值最小\n         ","metadata":{}},{"cell_type":"code","source":"# 3.梯度下降的实现\ndef gradient_descent(X, y, w, b, lr, iter):             # 定义逻辑回归梯度下降函数\n    l_history = np.zeros(iter)                          # 初始化梯度下降过程中误差值（损失）的数组\n    w_history = np.zeros((iter, w.shape[0], w.shape[1]))   # 初始化记录梯度下降过程中权重的数组\n    b_history = np.zeros(iter)                             # 初始化记录梯度下降过程中偏置的数组\n    for i in range(iter):                                  # 进行迭代训练\n        y_hat = sigmoid(np.dot(X, w) + b)                  # Sigmoid逻辑函数 + 线性函数(wX+b) 得到 y'\n        loss = -(y*np.log(y_hat) + (1-y)*np.log(1-y_hat))   # 计算损失\n        derivative_w = np.dot(X.T, ((y_hat-y)))/X.shape[0]     # 给权重向量求导\n        derivative_b = np.sum(y_hat-y)/X.shape[0]              # 给偏置求导\n        w = w - lr * derivative_w                           # 更行权重向量，lr即学习速率alpha\n        b = b - lr * derivative_b                            # 更新偏置，lr即学习速率alpha\n        l_history[i] = loss_function(X, y, w, b)            # 梯度下降过程中的损失\n        print(\"轮次:\", i+1, \"当前轮训练集损失:\", l_history[i])\n        w_history[i] = w   # 梯度下降过程中权重的历史记录，，请注意w_history和w的形状\n        b_history[i] = b   # 梯度下降过程中偏置的历史记录\n    return l_history, w_history, b_history\n        ","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.853122Z","iopub.execute_input":"2022-09-08T09:48:59.853912Z","iopub.status.idle":"2022-09-08T09:48:59.871934Z","shell.execute_reply.started":"2022-09-08T09:48:59.853877Z","shell.execute_reply":"2022-09-08T09:48:59.870531Z"},"trusted":true},"execution_count":11,"outputs":[]},{"cell_type":"code","source":"# 4.分类预测的实现\n# 梯度下降完成之后，就可以直接调用gradient_descent进行机器训练，返回损失，最终的参考值\n# loss_history, weight_history, bias_history = gradient_descent(X_train, y_train, weight, bias, alpha, iteration)","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.877331Z","iopub.execute_input":"2022-09-08T09:48:59.878768Z","iopub.status.idle":"2022-09-08T09:48:59.884794Z","shell.execute_reply.started":"2022-09-08T09:48:59.878724Z","shell.execute_reply":"2022-09-08T09:48:59.883902Z"},"trusted":true},"execution_count":12,"outputs":[]},{"cell_type":"code","source":"# 先定义一个负责分类预测的函数\ndef predict(X, w, b):              # 定义预测函数\n    z = np.dot(X, w) + b           # 线性函数\n    y_hat = sigmoid(z)             # 逻辑函数转换\n    y_pred = np.zeros((y_hat.shape[0], 1))      # 初始化预测结果变量\n    for i in range(y_hat.shape[0]):\n        if y_hat[i, 0] < 0.5:\n            y_pred[i, 0] = 0         # 如果预测概率小于0.5,输出分类0\n        else:\n            y_pred[i, 0] = 1         # 如果预测概率大于0.5，输出分类0\n    return y_pred                   # 返回预测分类的结果","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.886759Z","iopub.execute_input":"2022-09-08T09:48:59.887196Z","iopub.status.idle":"2022-09-08T09:48:59.901833Z","shell.execute_reply.started":"2022-09-08T09:48:59.887163Z","shell.execute_reply":"2022-09-08T09:48:59.900630Z"},"trusted":true},"execution_count":13,"outputs":[]},{"cell_type":"markdown","source":"这个函数就通过预测概率阈值0.5,把y_hat转换成y_pred\n也就是把概率值转换成0或1的分类值，y_pred是一个和y标签同样维度的向量，通过比较y_pred和真值，就可以看出多少个预测正确，多少个预测错误","metadata":{}},{"cell_type":"markdown","source":"**4.3.3 开始训练机器**\n把上面所有的内容封装成一个逻辑回归模型\n","metadata":{}},{"cell_type":"code","source":"def logistic_regression(X, y, w, b, lr, iter):     # 定义逻辑回归模型\n    l_history, w_history, b_history = gradient_descent(X, y, w, b, lr, iter)    # 梯度下降\n    print(\"训练最终损失:\", l_history[-1])                                     # 输出最终损失\n    y_pred = predict(X, w_history[-1], b_history[-1])                      # 进行预测\n    training_acc = 100 - np.mean(np.abs(y_pred - y_train))*100            # 计算准确率\n    print(\"逻辑回归训练准确率: {:.2f}%\".format(training_acc))                 # 输出准确率\n    return l_history, w_history, b_history                                # 返回历史训练记录","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.903634Z","iopub.execute_input":"2022-09-08T09:48:59.904711Z","iopub.status.idle":"2022-09-08T09:48:59.912648Z","shell.execute_reply.started":"2022-09-08T09:48:59.904673Z","shell.execute_reply":"2022-09-08T09:48:59.911505Z"},"trusted":true},"execution_count":14,"outputs":[]},{"cell_type":"code","source":"# 还要准备参数的初始值\n# 初始化参数\ndimension = X.shape[1]         # 这里的维度是len(X)是矩阵的行数目，维度是列的数目\nweight = np.full((dimension, 1), 0.1)   #权重向量，向量一般是1D的，这里实际上创建了2D向量\nbias = 0\n# 初始化超参数\nalpha = 1                       # 学习速率\niterations = 500                # 迭代次数\n","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:48:59.913887Z","iopub.execute_input":"2022-09-08T09:48:59.914597Z","iopub.status.idle":"2022-09-08T09:48:59.922667Z","shell.execute_reply.started":"2022-09-08T09:48:59.914565Z","shell.execute_reply":"2022-09-08T09:48:59.921254Z"},"trusted":true},"execution_count":15,"outputs":[]},{"cell_type":"code","source":"# 调用逻辑回归函数训练机器\nloss_history, weight_history, bias_history = logistic_regression(X_train, y_train, weight, bias, alpha, iterations)","metadata":{"execution":{"iopub.status.busy":"2022-09-08T10:40:50.241617Z","iopub.execute_input":"2022-09-08T10:40:50.242310Z","iopub.status.idle":"2022-09-08T10:40:50.314330Z","shell.execute_reply.started":"2022-09-08T10:40:50.242278Z","shell.execute_reply":"2022-09-08T10:40:50.313130Z"},"trusted":true},"execution_count":26,"outputs":[{"name":"stdout","text":"轮次: 1 当前轮训练集损失: 0.6698072081866441\n轮次: 2 当前轮训练集损失: 0.6441357015045888\n轮次: 3 当前轮训练集损失: 0.6217225572201343\n轮次: 4 当前轮训练集损失: 0.6020047939937195\n轮次: 5 当前轮训练集损失: 0.5846004197913068\n轮次: 6 当前轮训练集损失: 0.5691802153339961\n轮次: 7 当前轮训练集损失: 0.5554626339278943\n轮次: 8 当前轮训练集损失: 0.5432083414568926\n轮次: 9 当前轮训练集损失: 0.5322145949254381\n轮次: 10 当前轮训练集损失: 0.5223099138040177\n轮次: 11 当前轮训练集损失: 0.5133492722518356\n轮次: 12 当前轮训练集损失: 0.5052098949044318\n轮次: 13 当前轮训练集损失: 0.49778765499909156\n轮次: 14 当前轮训练集损失: 0.4909940300120578\n轮次: 15 当前轮训练集损失: 0.4847535511142182\n轮次: 16 当前轮训练集损失: 0.4790016781187627\n轮次: 17 当前轮训练集损失: 0.4736830345323378\n轮次: 18 当前轮训练集损失: 0.4687499438076212\n轮次: 19 当前轮训练集损失: 0.4641612156208906\n轮次: 20 当前轮训练集损失: 0.45988113871759656\n轮次: 21 当前轮训练集损失: 0.45587864397137\n轮次: 22 当前轮训练集损失: 0.45212660754001593\n轮次: 23 当前轮训练集损失: 0.4486012693266089\n轮次: 24 当前轮训练集损失: 0.4452817464155596\n轮次: 25 当前轮训练集损失: 0.4421496248472059\n轮次: 26 当前轮训练集损失: 0.43918861612807175\n轮次: 27 当前轮训练集损失: 0.4363842673527176\n轮次: 28 当前轮训练集损失: 0.43372371583236907\n轮次: 29 当前轮训练集损失: 0.4311954807678423\n轮次: 30 当前轮训练集损失: 0.42878928583939235\n轮次: 31 当前轮训练集损失: 0.4264959076718295\n轮次: 32 当前轮训练集损失: 0.42430704601699293\n轮次: 33 当前轮训练集损失: 0.42221521221603053\n轮次: 34 当前轮训练集损失: 0.42021363309214715\n轮次: 35 当前轮训练集损失: 0.41829616790576435\n轮次: 36 当前轮训练集损失: 0.41645723639870236\n轮次: 37 当前轮训练集损失: 0.41469175627839683\n轮次: 38 当前轮训练集损失: 0.41299508876046864\n轮次: 39 当前轮训练集损失: 0.4113629910087887\n轮次: 40 当前轮训练集损失: 0.40979157449506937\n轮次: 41 当前轮训练集损失: 0.4082772684518821\n轮次: 42 当前轮训练集损失: 0.40681678771944685\n轮次: 43 当前轮训练集损失: 0.4054071043920817\n轮次: 44 当前轮训练集损失: 0.40404542275853683\n轮次: 45 当前轮训练集损失: 0.4027291571045524\n轮次: 46 当前轮训练集损失: 0.4014559120083298\n轮次: 47 当前轮训练集损失: 0.4002234648121823\n轮次: 48 当前轮训练集损失: 0.3990297499980852\n轮次: 49 当前轮训练集损失: 0.39787284523251487\n轮次: 50 当前轮训练集损失: 0.39675095887796513\n轮次: 51 当前轮训练集损失: 0.39566241879578123\n轮次: 52 当前轮训练集损失: 0.3946056622882051\n轮次: 53 当前轮训练集损失: 0.3935792270474172\n轮次: 54 当前轮训练集损失: 0.39258174299641324\n轮次: 55 当前轮训练集损失: 0.3916119249212055\n轮次: 56 当前轮训练集损失: 0.3906685658064506\n轮次: 57 当前轮训练集损失: 0.3897505307974863\n轮次: 58 当前轮训练集损失: 0.38885675172117007\n轮次: 59 当前轮训练集损失: 0.3879862221060586\n轮次: 60 当前轮训练集损失: 0.3871379926495382\n轮次: 61 当前轮训练集损失: 0.3863111670856694\n轮次: 62 当前轮训练集损失: 0.38550489841286195\n轮次: 63 当前轮训练集损失: 0.38471838544517356\n轮次: 64 当前轮训练集损失: 0.38395086965511427\n轮次: 65 当前轮训练集损失: 0.38320163227941684\n轮次: 66 当前轮训练集损失: 0.38246999166237416\n轮次: 67 当前轮训练集损失: 0.3817553008141076\n轮次: 68 当前轮训练集损失: 0.3810569451635554\n轮次: 69 当前轮训练集损失: 0.380374340488117\n轮次: 70 当前轮训练集损失: 0.37970693100377595\n轮次: 71 当前轮训练集损失: 0.3790541876012006\n轮次: 72 当前轮训练集损失: 0.3784156062148012\n轮次: 73 当前轮训练集损失: 0.37779070631303674\n轮次: 74 当前轮训练集损失: 0.37717902949943194\n轮次: 75 当前轮训练集损失: 0.3765801382148033\n轮次: 76 当前轮训练集损失: 0.3759936145321206\n轮次: 77 当前轮训练集损失: 0.3754190590362493\n轮次: 78 当前轮训练集损失: 0.3748560897815636\n轮次: 79 当前轮训练集损失: 0.37430434132107465\n轮次: 80 当前轮训练集损失: 0.37376346380130937\n轮次: 81 当前轮训练集损失: 0.3732331221177056\n轮次: 82 当前轮训练集损失: 0.37271299512576417\n轮次: 83 当前轮训练集损失: 0.37220277490362613\n轮次: 84 当前轮训练集损失: 0.37170216606212597\n轮次: 85 当前轮训练集损失: 0.3712108850987204\n轮次: 86 当前轮训练集损失: 0.3707286597920046\n轮次: 87 当前轮训练集损失: 0.3702552286338063\n轮次: 88 当前轮训练集损失: 0.36979034029611\n轮次: 89 当前轮训练集损失: 0.3693337531302876\n轮次: 90 当前轮训练集损失: 0.36888523469632495\n轮次: 91 当前轮训练集损失: 0.36844456131992365\n轮次: 92 当前轮训练集损失: 0.368011517675527\n轮次: 93 当前轮训练集损失: 0.36758589639347916\n轮次: 94 当前轮训练集损失: 0.3671674976896655\n轮次: 95 当前轮训练集损失: 0.36675612901611615\n轮次: 96 当前轮训练集损失: 0.3663516047311674\n轮次: 97 当前轮训练集损失: 0.3659537457878905\n轮次: 98 当前轮训练集损失: 0.36556237943958914\n轮次: 99 当前轮训练集损失: 0.36517733896126225\n轮次: 100 当前轮训练集损失: 0.3647984633860087\n轮次: 101 当前轮训练集损失: 0.36442559725542567\n轮次: 102 当前轮训练集损失: 0.3640585903831255\n轮次: 103 当前轮训练集损失: 0.36369729763055225\n轮次: 104 当前轮训练集损失: 0.3633415786943457\n轮次: 105 当前轮训练集损失: 0.36299129790454876\n轮次: 106 当前轮训练集损失: 0.36264632403300484\n轮次: 107 当前轮训练集损失: 0.3623065301113382\n轮次: 108 当前轮训练集损失: 0.36197179325795126\n轮次: 109 当前轮训练集损失: 0.3616419945135112\n轮次: 110 当前轮训练集损失: 0.36131701868443505\n轮次: 111 当前轮训练集损失: 0.36099675419391397\n轮次: 112 当前轮训练集损失: 0.3606810929400484\n轮次: 113 当前轮训练集损失: 0.360369930160694\n轮次: 114 当前轮训练集损失: 0.36006316430464413\n轮次: 115 当前轮训练集损失: 0.3597606969087991\n轮次: 116 当前轮训练集损失: 0.35946243248099363\n轮次: 117 当前轮训练集损失: 0.3591682783881776\n轮次: 118 当前轮训练集损失: 0.35887814474965846\n轮次: 119 当前轮训练集损失: 0.3585919443351397\n轮次: 120 当前轮训练集损失: 0.35830959246730004\n轮次: 121 当前轮训练集损失: 0.3580310069286748\n轮次: 122 当前轮训练集损失: 0.35775610787261747\n轮次: 123 当前轮训练集损失: 0.3574848177381315\n轮次: 124 当前轮训练集损失: 0.357217061168373\n轮次: 125 当前轮训练集损失: 0.35695276493264044\n轮次: 126 当前轮训练集损失: 0.3566918578516758\n轮次: 127 当前轮训练集损失: 0.35643427072611095\n轮次: 128 当前轮训练集损失: 0.3561799362679056\n轮次: 129 当前轮训练集损失: 0.35592878903462954\n轮次: 130 当前轮训练集损失: 0.3556807653664505\n轮次: 131 当前轮训练集损失: 0.3554358033256974\n轮次: 132 当前轮训练集损失: 0.3551938426388769\n轮次: 133 当前轮训练集损失: 0.35495482464102346\n轮次: 134 当前轮训练集损失: 0.35471869222227737\n轮次: 135 当前轮训练集损失: 0.35448538977658267\n轮次: 136 当前轮训练集损失: 0.35425486315240856\n轮次: 137 当前轮训练集损失: 0.35402705960540065\n轮次: 138 当前轮训练集损失: 0.35380192775287317\n轮次: 139 当前轮训练集损失: 0.3535794175300595\n轮次: 140 当前轮训练集损失: 0.3533594801480407\n轮次: 141 当前轮训练集损失: 0.3531420680532774\n轮次: 142 当前轮训练集损失: 0.352927134888674\n轮次: 143 当前轮训练集损失: 0.352714635456107\n轮次: 144 当前轮训练集损失: 0.3525045256803532\n轮次: 145 当前轮训练集损失: 0.3522967625743574\n轮次: 146 当前轮训练集损失: 0.3520913042057811\n轮次: 147 当前轮训练集损失: 0.3518881096647775\n轮次: 148 当前轮训练集损失: 0.35168713903293974\n轮次: 149 当前轮训练集损失: 0.351488353353374\n轮次: 150 当前轮训练集损失: 0.35129171460184827\n轮次: 151 当前轮训练集损失: 0.3510971856589733\n轮次: 152 当前轮训练集损失: 0.35090473028337216\n轮次: 153 当前轮训练集损失: 0.3507143130857974\n轮次: 154 当前轮训练集损失: 0.3505258995041566\n轮次: 155 当前轮训练集损失: 0.3503394557794108\n轮次: 156 当前轮训练集损失: 0.35015494893230836\n轮次: 157 当前轮训练集损失: 0.34997234674092154\n轮次: 158 当前轮训练集损失: 0.34979161771895384\n轮次: 159 当前轮训练集损失: 0.3496127310947875\n轮次: 160 当前轮训练集损失: 0.3494356567912404\n轮次: 161 当前轮训练集损失: 0.34926036540600636\n轮次: 162 当前轮训练集损失: 0.34908682819275094\n轮次: 163 当前轮训练集损失: 0.3489150170428378\n轮次: 164 当前轮训练集损失: 0.3487449044676604\n轮次: 165 当前轮训练集损失: 0.34857646358155675\n轮次: 166 当前轮训练集损失: 0.3484096680852849\n轮次: 167 当前轮训练集损失: 0.34824449225003573\n轮次: 168 当前轮训练集损失: 0.3480809109019665\n轮次: 169 当前轮训练集损失: 0.34791889940723275\n轮次: 170 当前轮训练集损失: 0.34775843365749926\n轮次: 171 当前轮训练集损失: 0.3475994900559159\n轮次: 172 当前轮训练集损失: 0.3474420455035375\n轮次: 173 当前轮训练集损失: 0.3472860773861729\n轮次: 174 当前轮训练集损失: 0.34713156356164787\n轮次: 175 当前轮训练集损失: 0.3469784823474656\n轮次: 176 当前轮训练集损失: 0.3468268125088522\n轮次: 177 当前轮训练集损失: 0.34667653324717107\n轮次: 178 当前轮训练集损失: 0.34652762418869465\n轮次: 179 当前轮训练集损失: 0.34638006537372035\n轮次: 180 当前轮训练集损失: 0.3462338372460181\n轮次: 181 当前轮训练集损失: 0.34608892064259794\n轮次: 182 当前轮训练集损失: 0.3459452967837869\n轮次: 183 当前轮训练集损失: 0.34580294726360383\n轮次: 184 当前轮训练集损失: 0.34566185404042177\n轮次: 185 当前轮训练集损失: 0.3455219994279082\n轮次: 186 当前轮训练集损失: 0.34538336608623416\n轮次: 187 当前轮训练集损失: 0.34524593701354117\n轮次: 188 当前轮训练集损失: 0.3451096955376595\n轮次: 189 当前轮训练集损失: 0.3449746253080676\n轮次: 190 当前轮训练集损失: 0.34484071028808533\n轮次: 191 当前轮训练集损失: 0.3447079347472925\n轮次: 192 当前轮训练集损失: 0.3445762832541662\n轮次: 193 当前轮训练集损失: 0.34444574066892863\n轮次: 194 当前轮训练集损失: 0.34431629213659865\n轮次: 195 当前轮训练集损失: 0.3441879230802414\n轮次: 196 当前轮训练集损失: 0.34406061919440734\n轮次: 197 当前轮训练集损失: 0.3439343664387567\n轮次: 198 当前轮训练集损失: 0.3438091510318627\n轮次: 199 当前轮训练集损失: 0.3436849594451862\n轮次: 200 当前轮训练集损失: 0.34356177839721863\n轮次: 201 当前轮训练集损失: 0.34343959484778674\n轮次: 202 当前轮训练集损失: 0.3433183959925125\n轮次: 203 当前轮训练集损失: 0.3431981692574268\n轮次: 204 当前轮训练集损失: 0.3430789022937282\n轮次: 205 当前轮训练集损失: 0.342960582972685\n轮次: 206 当前轮训练集损失: 0.34284319938067426\n轮次: 207 当前轮训练集损失: 0.3427267398143545\n轮次: 208 当前轮训练集损失: 0.3426111927759683\n轮次: 209 当前轮训练集损失: 0.34249654696876963\n轮次: 210 当前轮训练集损失: 0.34238279129257193\n轮次: 211 当前轮训练集损失: 0.3422699148394155\n轮次: 212 当前轮训练集损失: 0.34215790688934766\n轮次: 213 当前轮训练集损失: 0.3420467569063138\n轮次: 214 当前轮训练集损失: 0.34193645453415644\n轮次: 215 当前轮训练集损失: 0.3418269895927168\n轮次: 216 当前轮训练集损失: 0.3417183520740392\n轮次: 217 当前轮训练集损失: 0.34161053213867165\n轮次: 218 当前轮训练集损失: 0.34150352011206225\n轮次: 219 当前轮训练集损失: 0.34139730648104777\n轮次: 220 当前轮训练集损失: 0.34129188189043097\n轮次: 221 当前轮训练集损失: 0.3411872371396456\n轮次: 222 当前轮训练集损失: 0.34108336317950505\n轮次: 223 当前轮训练集损失: 0.34098025110903274\n轮次: 224 当前轮训练集损失: 0.3408778921723724\n轮次: 225 当前轮训练集损失: 0.3407762777557746\n轮次: 226 当前轮训练集损失: 0.34067539938465957\n轮次: 227 当前轮训练集损失: 0.34057524872075046\n轮次: 228 当前轮训练集损失: 0.3404758175592801\n轮次: 229 当前轮训练集损失: 0.34037709782626374\n轮次: 230 当前轮训练集损失: 0.34027908157584014\n轮次: 231 当前轮训练集损失: 0.34018176098767666\n轮次: 232 当前轮训练集损失: 0.34008512836443794\n轮次: 233 当前轮训练集损失: 0.33998917612931473\n轮次: 234 当前轮训练集损失: 0.3398938968236134\n轮次: 235 当前轮训练集损失: 0.3397992831044022\n轮次: 236 当前轮训练集损失: 0.33970532774221485\n轮次: 237 当前轮训练集损失: 0.3396120236188073\n轮次: 238 当前轮训练集损失: 0.33951936372496927\n轮次: 239 当前轮训练集损失: 0.3394273411583865\n轮次: 240 当前轮训练集损失: 0.3393359491215534\n轮次: 241 当前轮训练集损失: 0.3392451809197344\n轮次: 242 当前轮训练集损失: 0.33915502995897395\n轮次: 243 当前轮训练集损失: 0.33906548974415157\n轮次: 244 当前轮训练集损失: 0.33897655387708203\n轮次: 245 当前轮训练集损失: 0.33888821605466085\n轮次: 246 当前轮训练集损失: 0.33880047006705033\n轮次: 247 当前轮训练集损失: 0.3387133097959086\n轮次: 248 当前轮训练集损失: 0.3386267292126589\n轮次: 249 当前轮训练集损失: 0.33854072237679744\n轮次: 250 当前轮训练集损失: 0.3384552834342407\n轮次: 251 当前轮训练集损失: 0.33837040661570905\n轮次: 252 当前轮训练集损失: 0.33828608623514733\n轮次: 253 当前轮训练集损失: 0.33820231668818046\n轮次: 254 当前轮训练集损失: 0.33811909245060406\n轮次: 255 当前轮训练集损失: 0.3380364080769079\n轮次: 256 当前轮训练集损失: 0.33795425819883235\n轮次: 257 当前轮训练集损失: 0.33787263752395735\n轮次: 258 当前轮训练集损失: 0.3377915408343214\n轮次: 259 当前轮训练集损失: 0.3377109629850715\n轮次: 260 当前轮训练集损失: 0.3376308989031423\n轮次: 261 当前轮训练集损失: 0.3375513435859643\n轮次: 262 当前轮训练集损失: 0.33747229210019936\n轮次: 263 当前轮训练集损失: 0.3373937395805047\n轮次: 264 当前轮训练集损失: 0.33731568122832245\n轮次: 265 当前轮训练集损失: 0.3372381123106956\n轮次: 266 当前轮训练集损失: 0.3371610281591094\n轮次: 267 当前轮训练集损失: 0.3370844241683571\n轮次: 268 当前轮训练集损失: 0.3370082957954301\n轮次: 269 当前轮训练集损失: 0.3369326385584316\n轮次: 270 当前轮训练集损失: 0.33685744803551265\n轮次: 271 当前轮训练集损失: 0.33678271986383157\n轮次: 272 当前轮训练集损失: 0.33670844973853364\n轮次: 273 当前轮训练集损失: 0.33663463341175354\n轮次: 274 当前轮训练集损失: 0.3365612666916381\n轮次: 275 当前轮训练集损失: 0.33648834544138867\n轮次: 276 当前轮训练集损失: 0.3364158655783241\n轮次: 277 当前轮训练集损失: 0.3363438230729627\n轮次: 278 当前轮训练集损失: 0.3362722139481227\n轮次: 279 当前轮训练集损失: 0.3362010342780417\n轮次: 280 当前轮训练集损失: 0.33613028018751384\n轮次: 281 当前轮训练集损失: 0.33605994785104404\n轮次: 282 当前轮训练集损失: 0.33599003349202006\n轮次: 283 当前轮训练集损失: 0.335920533381901\n轮次: 284 当前轮训练集损失: 0.3358514438394217\n轮次: 285 当前轮训练集损失: 0.335782761229814\n轮次: 286 当前轮训练集损失: 0.3357144819640423\n轮次: 287 当前轮训练集损失: 0.33564660249805545\n轮次: 288 当前轮训练集损失: 0.3355791193320535\n轮次: 289 当前轮训练集损失: 0.3355120290097673\n轮次: 290 当前轮训练集损失: 0.33544532811775485\n轮次: 291 当前轮训练集损失: 0.33537901328470904\n轮次: 292 当前轮训练集损失: 0.3353130811807808\n轮次: 293 当前轮训练集损失: 0.33524752851691436\n轮次: 294 当前轮训练集损失: 0.33518235204419566\n轮次: 295 当前轮训练集损失: 0.3351175485532141\n轮次: 296 当前轮训练集损失: 0.335053114873435\n轮次: 297 当前轮训练集损失: 0.3349890478725862\n轮次: 298 当前轮训练集损失: 0.3349253444560548\n轮次: 299 当前轮训练集损失: 0.3348620015662966\n轮次: 300 当前轮训练集损失: 0.3347990161822555\n轮次: 301 当前轮训练集损失: 0.3347363853187955\n轮次: 302 当前轮训练集损失: 0.3346741060261421\n轮次: 303 当前轮训练集损失: 0.33461217538933546\n轮次: 304 当前轮训练集损失: 0.3345505905276923\n轮次: 305 当前轮训练集损失: 0.3344893485942799\n轮次: 306 当前轮训练集损失: 0.33442844677539824\n轮次: 307 当前轮训练集损失: 0.33436788229007247\n轮次: 308 当前轮训练集损失: 0.3343076523895551\n轮次: 309 当前轮训练集损失: 0.334247754356837\n轮次: 310 当前轮训练集损失: 0.3341881855061672\n轮次: 311 当前轮训练集损失: 0.3341289431825824\n轮次: 312 当前轮训练集损失: 0.33407002476144465\n轮次: 313 当前轮训练集损失: 0.3340114276479869\n轮次: 314 当前轮训练集损失: 0.3339531492768679\n轮次: 315 当前轮训练集损失: 0.33389518711173466\n轮次: 316 当前轮训练集损失: 0.3338375386447925\n轮次: 317 当前轮训练集损失: 0.33378020139638387\n轮次: 318 当前轮训练集损失: 0.33372317291457376\n轮次: 319 当前轮训练集损失: 0.333666450774743\n轮次: 320 当前轮训练集损失: 0.3336100325791891\n轮次: 321 当前轮训练集损失: 0.3335539159567335\n轮次: 322 当前轮训练集损失: 0.33349809856233675\n轮次: 323 当前轮训练集损失: 0.3334425780767196\n轮次: 324 当前轮训练集损失: 0.33338735220599136\n轮次: 325 当前轮训练集损失: 0.333332418681285\n轮次: 326 当前轮训练集损失: 0.3332777752583977\n轮次: 327 当前轮训练集损失: 0.3332234197174391\n轮次: 328 当前轮训练集损失: 0.33316934986248414\n轮次: 329 当前轮训练集损失: 0.3331155635212339\n轮次: 330 当前轮训练集损失: 0.33306205854468013\n轮次: 331 当前轮训练集损失: 0.3330088328067772\n轮次: 332 当前轮训练集损失: 0.33295588420411915\n轮次: 333 当前轮训练集损失: 0.33290321065562234\n轮次: 334 当前轮训练集损失: 0.3328508101022134\n轮次: 335 当前轮训练集损失: 0.3327986805065231\n轮次: 336 当前轮训练集损失: 0.33274681985258475\n轮次: 337 当前轮训练集损失: 0.3326952261455377\n轮次: 338 当前轮训练集损失: 0.33264389741133715\n轮次: 339 当前轮训练集损失: 0.33259283169646703\n轮次: 340 当前轮训练集损失: 0.3325420270676587\n轮次: 341 当前轮训练集损失: 0.33249148161161507\n轮次: 342 当前轮训练集损失: 0.3324411934347377\n轮次: 343 当前轮训练集损失: 0.3323911606628598\n轮次: 344 当前轮训练集损失: 0.3323413814409832\n轮次: 345 当前轮训练集损失: 0.3322918539330196\n轮次: 346 当前轮训练集损失: 0.3322425763215364\n轮次: 347 当前轮训练集损失: 0.33219354680750646\n轮次: 348 当前轮训练集损失: 0.33214476361006207\n轮次: 349 当前轮训练集损失: 0.3320962249662532\n轮次: 350 当前轮训练集损失: 0.3320479291308093\n轮次: 351 当前轮训练集损失: 0.33199987437590545\n轮次: 352 当前轮训练集损失: 0.3319520589909318\n轮次: 353 当前轮训练集损失: 0.3319044812822671\n轮次: 354 当前轮训练集损失: 0.33185713957305607\n轮次: 355 当前轮训练集损失: 0.3318100322029899\n轮次: 356 当前轮训练集损失: 0.33176315752809066\n轮次: 357 当前轮训练集损失: 0.33171651392049906\n轮次: 358 当前轮训练集损失: 0.3316700997682652\n轮次: 359 当前轮训练集损失: 0.3316239134751439\n轮次: 360 当前轮训练集损失: 0.3315779534603914\n轮次: 361 当前轮训练集损失: 0.33153221815856737\n轮次: 362 当前轮训练集损失: 0.3314867060193382\n轮次: 363 当前轮训练集损失: 0.3314414155072848\n轮次: 364 当前轮训练集损失: 0.33139634510171245\n轮次: 365 当前轮训练集损失: 0.3313514932964643\n轮次: 366 当前轮训练集损失: 0.3313068585997376\n轮次: 367 当前轮训练集损失: 0.33126243953390233\n轮次: 368 当前轮训练集损失: 0.3312182346353236\n轮次: 369 当前轮训练集损失: 0.3311742424541859\n轮次: 370 当前轮训练集损失: 0.33113046155432063\n轮次: 371 当前轮训练集损失: 0.331086890513036\n轮次: 372 当前轮训练集损失: 0.33104352792094993\n轮次: 373 当前轮训练集损失: 0.33100037238182467\n轮次: 374 当前轮训练集损失: 0.33095742251240545\n轮次: 375 当前轮训练集损失: 0.3309146769422599\n轮次: 376 当前轮训练集损失: 0.33087213431362084\n轮次: 377 当前轮训练集损失: 0.33082979328123174\n轮次: 378 当前轮训练集损失: 0.33078765251219383\n轮次: 379 当前轮训练集损失: 0.3307457106858158\n轮次: 380 当前轮训练集损失: 0.3307039664934657\n轮次: 381 当前轮训练集损失: 0.33066241863842527\n轮次: 382 当前轮训练集损失: 0.3306210658357464\n轮次: 383 当前轮训练集损失: 0.3305799068121094\n轮次: 384 当前轮训练集损失: 0.33053894030568404\n轮次: 385 当前轮训练集损失: 0.3304981650659916\n轮次: 386 当前轮训练集损失: 0.3304575798537704\n轮次: 387 当前轮训练集损失: 0.3304171834408422\n轮次: 388 当前轮训练集损失: 0.3303769746099805\n轮次: 389 当前轮训练集损失: 0.3303369521547823\n轮次: 390 当前轮训练集损失: 0.3302971148795392\n轮次: 391 当前轮训练集损失: 0.3302574615991132\n轮次: 392 当前轮训练集损失: 0.3302179911388119\n轮次: 393 当前轮训练集损失: 0.33017870233426716\n轮次: 394 当前轮训练集损失: 0.33013959403131476\n轮次: 395 当前轮训练集损失: 0.3301006650858759\n轮次: 396 当前轮训练集损失: 0.3300619143638406\n轮次: 397 当前轮训练集损失: 0.33002334074095235\n轮次: 398 当前轮训练集损失: 0.32998494310269527\n轮次: 399 当前轮训练集损失: 0.32994672034418193\n轮次: 400 当前轮训练集损失: 0.329908671370043\n轮次: 401 当前轮训练集损失: 0.32987079509431944\n轮次: 402 当前轮训练集损失: 0.3298330904403544\n轮次: 403 当前轮训练集损失: 0.3297955563406888\n轮次: 404 当前轮训练集损失: 0.3297581917369561\n轮次: 405 当前轮训练集损失: 0.32972099557978085\n轮次: 406 当前轮训练集损失: 0.32968396682867696\n轮次: 407 当前轮训练集损失: 0.3296471044519478\n轮次: 408 当前轮训练集损失: 0.3296104074265885\n轮次: 409 当前轮训练集损失: 0.3295738747381885\n轮次: 410 当前轮训练集损失: 0.32953750538083637\n轮次: 411 当前轮训练集损失: 0.32950129835702496\n轮次: 412 当前轮训练集损失: 0.3294652526775591\n轮次: 413 当前轮训练集损失: 0.3294293673614636\n轮次: 414 当前轮训练集损失: 0.3293936414358927\n轮次: 415 当前轮训练集损失: 0.3293580739360412\n轮次: 416 当前轮训练集损失: 0.3293226639050564\n轮次: 417 当前轮训练集损失: 0.3292874103939514\n轮次: 418 当前轮训练集损失: 0.32925231246151915\n轮次: 419 当前轮训练集损失: 0.329217369174249\n轮次: 420 当前轮训练集损失: 0.3291825796062422\n轮次: 421 当前轮训练集损失: 0.329147942839131\n轮次: 422 当前轮训练集损失: 0.32911345796199676\n轮次: 423 当前轮训练集损失: 0.3290791240712902\n轮次: 424 当前轮训练集损失: 0.3290449402707531\n轮次: 425 当前轮训练集损失: 0.3290109056713398\n轮次: 426 当前轮训练集损失: 0.32897701939114066\n轮次: 427 当前轮训练集损失: 0.3289432805553069\n轮次: 428 当前轮训练集损失: 0.32890968829597483\n轮次: 429 当前轮训练集损失: 0.32887624175219315\n轮次: 430 当前轮训练集损失: 0.3288429400698495\n轮次: 431 当前轮训练集损失: 0.3288097824015988\n轮次: 432 当前轮训练集损失: 0.32877676790679267\n轮次: 433 当前轮训练集损失: 0.3287438957514095\n轮次: 434 当前轮训练集损失: 0.32871116510798504\n轮次: 435 当前轮训练集损失: 0.32867857515554455\n轮次: 436 当前轮训练集损失: 0.3286461250795358\n轮次: 437 当前轮训练集损失: 0.32861381407176227\n轮次: 438 当前轮训练集损失: 0.32858164133031825\n轮次: 439 当前轮训练集损失: 0.3285496060595234\n轮次: 440 当前轮训练集损失: 0.3285177074698601\n轮次: 441 当前轮训练集损失: 0.32848594477790916\n轮次: 442 当前轮训练集损失: 0.3284543172062888\n轮次: 443 当前轮训练集损失: 0.3284228239835924\n轮次: 444 当前轮训练集损失: 0.3283914643443285\n轮次: 445 当前轮训练集损失: 0.3283602375288608\n轮次: 446 当前轮训练集损失: 0.328329142783349\n轮次: 447 当前轮训练集损失: 0.32829817935969063\n轮次: 448 当前轮训练集损失: 0.32826734651546335\n轮次: 449 当前轮训练集损失: 0.32823664351386833\n轮次: 450 当前轮训练集损失: 0.3282060696236738\n轮次: 451 当前轮训练集损失: 0.32817562411916\n轮次: 452 当前轮训练集损失: 0.3281453062800643\n轮次: 453 当前轮训练集损失: 0.32811511539152677\n轮次: 454 当前轮训练集损失: 0.32808505074403754\n轮次: 455 当前轮训练集损失: 0.3280551116333835\n轮次: 456 当前轮训练集损失: 0.3280252973605967\n轮次: 457 当前轮训练集损失: 0.32799560723190246\n轮次: 458 当前轮训练集损失: 0.327966040558669\n轮次: 459 当前轮训练集损失: 0.327936596657357\n轮次: 460 当前轮训练集损失: 0.3279072748494703\n轮次: 461 当前轮训练集损失: 0.32787807446150696\n轮次: 462 当前轮训练集损失: 0.3278489948249107\n轮次: 463 当前轮训练集损失: 0.3278200352760235\n轮次: 464 当前轮训练集损失: 0.32779119515603816\n轮次: 465 当前轮训练集损失: 0.3277624738109516\n轮次: 466 当前轮训练集损失: 0.3277338705915195\n轮次: 467 当前轮训练集损失: 0.32770538485321016\n轮次: 468 当前轮训练集损失: 0.32767701595615967\n轮次: 469 当前轮训练集损失: 0.327648763265128\n轮次: 470 当前轮训练集损失: 0.3276206261494547\n轮次: 471 当前轮训练集损失: 0.32759260398301554\n轮次: 472 当前轮训练集损失: 0.3275646961441802\n轮次: 473 当前轮训练集损失: 0.3275369020157694\n轮次: 474 当前轮训练集损失: 0.32750922098501356\n轮次: 475 当前轮训练集损失: 0.32748165244351124\n轮次: 476 当前轮训练集损失: 0.3274541957871884\n轮次: 477 当前轮训练集损失: 0.327426850416258\n轮次: 478 当前轮训练集损失: 0.3273996157351805\n轮次: 479 当前轮训练集损失: 0.32737249115262385\n轮次: 480 当前轮训练集损失: 0.3273454760814252\n轮次: 481 当前轮训练集损失: 0.3273185699385521\n轮次: 482 当前轮训练集损失: 0.3272917721450643\n轮次: 483 当前轮训练集损失: 0.3272650821260768\n轮次: 484 当前轮训练集损失: 0.3272384993107219\n轮次: 485 当前轮训练集损失: 0.3272120231321134\n轮次: 486 当前轮训练集损失: 0.32718565302730934\n轮次: 487 当前轮训练集损失: 0.32715938843727677\n轮次: 488 当前轮训练集损失: 0.32713322880685625\n轮次: 489 当前轮训练集损失: 0.3271071735847266\n轮次: 490 当前轮训练集损失: 0.3270812222233702\n轮次: 491 当前轮训练集损失: 0.32705537417903896\n轮次: 492 当前轮训练集损失: 0.3270296289117203\n轮次: 493 当前轮训练集损失: 0.3270039858851039\n轮次: 494 当前轮训练集损失: 0.32697844456654807\n轮次: 495 当前轮训练集损失: 0.3269530044270477\n轮次: 496 当前轮训练集损失: 0.3269276649412014\n轮次: 497 当前轮训练集损失: 0.32690242558717975\n轮次: 498 当前轮训练集损失: 0.3268772858466935\n轮次: 499 当前轮训练集损失: 0.32685224520496237\n轮次: 500 当前轮训练集损失: 0.32682730315068426\n训练最终损失: 0.32682730315068426\n逻辑回归训练准确率: 85.95%\n","output_type":"stream"}]},{"cell_type":"markdown","source":"上面的准确率只是在训练集上面形成的预测准确率，还不能说明模型具有泛化的能力\n还需要在测试集中对模型进行测试","metadata":{}},{"cell_type":"code","source":"# 下面代码用训练皓的逻辑回归模型对测试集进行分类预测\ny_pred = predict(X_test, weight_history[-1], bias_history[-1])     # 预测测试集\ntesting_acc = 100 - np.mean(np.abs(y_pred - y_test))*100           # 计算准确率\nprint(\"逻辑回归测试准确率: {:.2f}%\".format(testing_acc))\n","metadata":{"execution":{"iopub.status.busy":"2022-09-08T09:49:00.007063Z","iopub.execute_input":"2022-09-08T09:49:00.007419Z","iopub.status.idle":"2022-09-08T09:49:00.014354Z","shell.execute_reply.started":"2022-09-08T09:49:00.007385Z","shell.execute_reply":"2022-09-08T09:49:00.013460Z"},"trusted":true},"execution_count":17,"outputs":[{"name":"stdout","text":"逻辑回归测试准确率: 81.97%\n","output_type":"stream"}]},{"cell_type":"markdown","source":"## 绘制损失曲线 ##","metadata":{}},{"cell_type":"code","source":"loss_history_test = np.zeros(iterations)     # 初始化历史损失\nfor i in range(iterations):                  # 求训练过程中不同参数带来的测试集损失\n    loss_history_test[i] = loss_function(X_test, y_test, weight_history[i], bias_history[i])\nindex = np.arange(0, iterations, 1)\nplt.plot(index, loss_history, c='blue', linestyle='solid')\nplt.plot(index, loss_history_test, c='red', linestyle='dashed')\nplt.legend([\"Training Loss\", \"Test Loss\"])\nplt.xlabel(\"Number of Iteration\")\nplt.ylabel(\"Cost\")\nplt.show()                                    # 同时显示训练集和测试集损失曲线","metadata":{"execution":{"iopub.status.busy":"2022-09-08T10:10:53.205687Z","iopub.execute_input":"2022-09-08T10:10:53.206126Z","iopub.status.idle":"2022-09-08T10:10:53.473047Z","shell.execute_reply.started":"2022-09-08T10:10:53.206091Z","shell.execute_reply":"2022-09-08T10:10:53.472092Z"},"trusted":true},"execution_count":18,"outputs":[{"output_type":"display_data","data":{"text/plain":"<Figure size 432x288 with 1 Axes>","image/png":"iVBORw0KGgoAAAANSUhEUgAAAYgAAAEGCAYAAAB/+QKOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMywgaHR0cHM6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2mPpkEfFXDG9YpwMnAdiAXeE5V+4t7mdDNwK3edh1xY9ucAHwkIicC/4cbouBUEYkHPhOR/3rb9wV6quqa4JOJSDvc+wb64d5J8F8R+YGqThSRc4DbVTU7VKCqWuwlkixVvck73u9wQ0P8xBtSY56IfBAUQ29V3e6VIi5WNzhhKvC5l8AmeHFmesfrGHTKce602ktETvJi7eqty8SNhlsErBCRP6tq8OigpgGwEoSpN1R1F/APYHwNdpuvqhtVtQg37EDgBr8YlxQCXlHVclVdiUskJ+HGu/k/cUNpf4Eb1qCLt/28ysnBcyowW1W3qhta+kXg7BrEW9l5wAQvhtm4YSM6eOveV9Xt3ncBficiX+GGXGhPxdDPh/M94F8Aqroc+BYIJIhZqlqgqvtxpaTjj+EaTD1lJQhT3zyBeynO34KWleL92BGRGKBx0LqioO/lQfPlHPz3X3nMGcXddG9W1ZnBK8QNMb3naII/CgJcqqorKsVwWqUYRgNpQD9VLRE30mnCMZw3+N+tDLtXNEhWgjD1iveL+RUqXicJ7k1b/bzvI4BGR3Hoy0UkxmuX6Ix7A9dM4GfihhBHRLp6I2keyTxgoIikinul7VXAxzWIYzeQHDQ/E7hZxL3UQkT6HGa/5rh3JJR4bQmBX/yVjxdsDi6x4FUtdcBdtzGAJQhTP/0RCO7NNBl3U16EexfC0fy6X4e7uf8HuMGrWnkOV72ywGvY/StV/JJWN6TyBNzQ04uAHFV980j7VPIR0D3QSA08gEt4X4nIUm8+lBeBLBFZjGs7We7Fk49rO1kSonH8KSDG22cqMNarijMGwEZzNcYYE5qVIIwxxoRkCcIYY0xIliCMMcaEZAnCGGNMSJYgjDHGhGQJwhhjTEiWIIwxxoT0///D+poOeAMYAAAAAElFTkSuQmCC\n"},"metadata":{"needs_background":"light"}}]},{"cell_type":"markdown","source":"在实际的项目中，没必要这样写代码,直接调用库函数即可","metadata":{}},{"cell_type":"markdown","source":"在这个数据集中，数据的值是0和1，如果原始数据是男和女这样的数据需要转换成1和0这样的格式\n但是在这个数据集中，cp这个字段，他的意义是胸痛类型，取值是0，1，2，3这样的数据\n计算机无法分辨类型，只会认为是0比1小，2比1大这样的意义，会导致过程存在误判，解决的方法是，把这个特征分成四个\n比如cp有四种类型，就分成cp1，cp2，cp3，cp4，这样的特征，每一个的值用1和0来表示","metadata":{}},{"cell_type":"code","source":"# 把3个文本型变量转换成哑变量(虚拟变量)\na = pd.get_dummies(df_heart['cp'], prefix = \"cp\")\nb = pd.get_dummies(df_heart['thal'], prefix = \"thal\")\nc = pd.get_dummies(df_heart['slope'], prefix = \"slope\")\n\n# 把哑变量添加进dataframe\nframes = [df_heart, a, b, c]\ndf_heart = pd.concat(frames, axis = 1)\ndf_heart = df_heart.drop(columns = ['cp', 'thal', 'slope'])\ndf_heart.head()     # 显示新的dataframe","metadata":{"execution":{"iopub.status.busy":"2022-09-08T10:39:25.974308Z","iopub.execute_input":"2022-09-08T10:39:25.974755Z","iopub.status.idle":"2022-09-08T10:39:26.007780Z","shell.execute_reply.started":"2022-09-08T10:39:25.974722Z","shell.execute_reply":"2022-09-08T10:39:26.007026Z"},"trusted":true},"execution_count":21,"outputs":[{"execution_count":21,"output_type":"execute_result","data":{"text/plain":"   age  sex  trestbps  chol  fbs  restecg  thalach  exang  oldpeak  ca  ...  \\\n0   63    1       145   233    1        0      150      0      2.3   0  ...   \n1   37    1       130   250    0        1      187      0      3.5   0  ...   \n2   41    0       130   204    0        0      172      0      1.4   0  ...   \n3   56    1       120   236    0        1      178      0      0.8   0  ...   \n4   57    0       120   354    0        1      163      1      0.6   0  ...   \n\n   cp_1  cp_2  cp_3  thal_0  thal_1  thal_2  thal_3  slope_0  slope_1  slope_2  \n0     0     0     1       0       1       0       0        1        0        0  \n1     0     1     0       0       0       1       0        1        0        0  \n2     1     0     0       0       0       1       0        0        0        1  \n3     1     0     0       0       0       1       0        0        0        1  \n4     0     0     0       0       0       1       0        0        0        1  \n\n[5 rows x 22 columns]","text/html":"<div>\n<style scoped>\n    .dataframe tbody tr th:only-of-type {\n        vertical-align: middle;\n    }\n\n    .dataframe tbody tr th {\n        vertical-align: top;\n    }\n\n    .dataframe thead th {\n        text-align: right;\n    }\n</style>\n<table border=\"1\" class=\"dataframe\">\n  <thead>\n    <tr style=\"text-align: right;\">\n      <th></th>\n      <th>age</th>\n      <th>sex</th>\n      <th>trestbps</th>\n      <th>chol</th>\n      <th>fbs</th>\n      <th>restecg</th>\n      <th>thalach</th>\n      <th>exang</th>\n      <th>oldpeak</th>\n      <th>ca</th>\n      <th>...</th>\n      <th>cp_1</th>\n      <th>cp_2</th>\n      <th>cp_3</th>\n      <th>thal_0</th>\n      <th>thal_1</th>\n      <th>thal_2</th>\n      <th>thal_3</th>\n      <th>slope_0</th>\n      <th>slope_1</th>\n      <th>slope_2</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <th>0</th>\n      <td>63</td>\n      <td>1</td>\n      <td>145</td>\n      <td>233</td>\n      <td>1</td>\n      <td>0</td>\n      <td>150</td>\n      <td>0</td>\n      <td>2.3</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>1</th>\n      <td>37</td>\n      <td>1</td>\n      <td>130</td>\n      <td>250</td>\n      <td>0</td>\n      <td>1</td>\n      <td>187</td>\n      <td>0</td>\n      <td>3.5</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n    </tr>\n    <tr>\n      <th>2</th>\n      <td>41</td>\n      <td>0</td>\n      <td>130</td>\n      <td>204</td>\n      <td>0</td>\n      <td>0</td>\n      <td>172</td>\n      <td>0</td>\n      <td>1.4</td>\n      <td>0</td>\n      <td>...</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>3</th>\n      <td>56</td>\n      <td>1</td>\n      <td>120</td>\n      <td>236</td>\n      <td>0</td>\n      <td>1</td>\n      <td>178</td>\n      <td>0</td>\n      <td>0.8</td>\n      <td>0</td>\n      <td>...</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n    </tr>\n    <tr>\n      <th>4</th>\n      <td>57</td>\n      <td>0</td>\n      <td>120</td>\n      <td>354</td>\n      <td>0</td>\n      <td>1</td>\n      <td>163</td>\n      <td>1</td>\n      <td>0.6</td>\n      <td>0</td>\n      <td>...</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n      <td>0</td>\n      <td>0</td>\n      <td>0</td>\n      <td>1</td>\n    </tr>\n  </tbody>\n</table>\n<p>5 rows × 22 columns</p>\n</div>"},"metadata":{}}]},{"cell_type":"code","source":"from sklearn.linear_model import LogisticRegression   # 导入逻辑回归模型\nlr = LogisticRegression()                             # lr，就是代表逻辑回归模型\nlr.fit(X_train, y_train)                              # fit就代表梯度下降\nprint(\"SK learn逻辑回归测试的准确率 {:.2f}%\".format(lr.score(X_test, y_test)*100))","metadata":{"execution":{"iopub.status.busy":"2022-09-08T10:40:18.129269Z","iopub.execute_input":"2022-09-08T10:40:18.129702Z","iopub.status.idle":"2022-09-08T10:40:18.150416Z","shell.execute_reply.started":"2022-09-08T10:40:18.129671Z","shell.execute_reply":"2022-09-08T10:40:18.149518Z"},"trusted":true},"execution_count":25,"outputs":[{"name":"stdout","text":"SK learn逻辑回归测试的准确率 83.61%\n","output_type":"stream"},{"name":"stderr","text":"/opt/conda/lib/python3.7/site-packages/sklearn/utils/validation.py:993: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().\n  y = column_or_1d(y, warn=True)\n","output_type":"stream"}]}]}